import Vue from 'vue';
import App from './App.vue';
import router from './router/index';
import store from './store/index';
import echart from 'echarts'

/** 饿了么 V2.8.2 **/
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)           

Vue.config.productionTip = false;
Vue.prototype.$echarts = echart

router.beforeEach((to, from, next) => {
  console.log(to)
  if (to.meta.title) {
      document.title = to.meta.title ? to.meta.title : '哈哈'
  }
  next()
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
